/* 订单地址详情页样式 */
.container {
    padding: 20px;
    background-color: #f7f7f7;
    font-family: Arial, sans-serif;
}

.section-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.address-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.address-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.3s;
    overflow: hidden; /* 隐藏溢出内容 */
}

.address-item:hover {
    border-color: #ff5000;
}

.address-item.default {
    border-color: #ff5000;
}
/* 添加选中的地址样式 */
.address-item.selected {
    border-color: rgb(255,83,4);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
}

.default-tag {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff5000;
    color: white;
    padding: 2px 8px;
    font-size: 12px;
    border-bottom-left-radius: 5px;
}

.address-item p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.address-actions {
    display: flex;
    align-items: center;
}

.address-actions a {
    margin-right: 15px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.address-actions a:hover {
    text-decoration: underline;
}

.address-actions-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-top-left-radius: 5px;
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.3s ease;
}

.address-item:hover .address-actions-overlay {
    opacity: 1; /* 悬停时显示 */
}

.edit-address-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.edit-address-btn:hover {
    text-decoration: underline;
}

/* 订单详情 */
.order-details .order-header {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.store-name i {
    margin-right: 5px;
    color: #ff5000;
}

.store-name .fa-check-circle {
    color: green;
    font-size: 14px;
}

.order-items-table {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.table-header,
.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr 0.8fr 0.8fr;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.table-header {
    background-color: #f8f8f8;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.table-row {
    background-color: white;
    font-size: 14px;
    color: #333;
}

.table-row > div {
    padding: 5px;
}

.item-info {
    display: flex;
    align-items: center;
}

.item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.item-details {
    flex-grow: 1;
}

.item-name {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.item-tags {
    margin: 5px 0 0;
    font-size: 12px;
    color: #999;
}

.item-property {
    color: #666;
}

.item-price {
    color: #ff5000;
}

.item-quantity button {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
}

.item-quantity input[type="number"] {
    width: 40px;
    height: 25px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 5px;
}

.item-subtotal {
     color: #ff5000;
     font-weight: bold;
}

.order-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}

.order-section:last-child {
    border-bottom: none;
}

.order-section.invoice label {
    font-size: 14px;
    color: #555;
}

.order-section.notes textarea {
    flex-grow: 1;
    margin-left: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-size: 14px;
    color: #333;
}

.order-section.notes .char-count {
    margin-left: 10px;
    color: #999;
    font-size: 12px;
}

.order-section.shipping div p {
    margin: 3px 0;
    text-align: right;
}

.order-section.returns .return-text {
    color: #ff5000;
}

.order-section.returns .free-text {
    color: green;
    font-size: 12px;
}

/* 付款详情 */
.payment-details-card h3 span {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

.payment-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.payment-summary p span {
    font-weight: bold;
    color: #333;
}

.payment-summary p .discount {
    color: #ff5000;
}

.discount-item {
    padding-left: 20px;
    font-size: 12px;
    color: #999 !important;
}

.discount-item span {
    font-weight: normal !important;
    color: #999 !important;
}

.payment-options {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.option-group {
    margin-bottom: 15px;
}

.option-group label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.option-group input[type="checkbox"] {
    margin-right: 5px;
}

.option-group .option-label {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

.installment-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-left: 20px;
}

.installment-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    color: #555;
}

.installment-item i {
    margin-right: 5px;
    color: #007bff;
}

.final-payment {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.final-payment span {
    font-size: 16px;
    margin-right: 10px;
}

.final-payment .amount {
    font-size: 24px;
    color: #ff5000;
    font-weight: bold;
    margin-right: 20px;
}

.submit-order-btn {
    background-color: #ff5000;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-order-btn:hover {
    background-color: #e54500;
}

/* 新建地址模态框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed; /* 固定位置 */
    z-index: 1000; /* 确保在最上层 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* 允许滚动 */
    background-color: rgba(0,0,0,0.5); /* 半透明黑色背景 */
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px; /* 最大宽度 */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation-name: animatetop;
    animation-duration: 0.4s
}

/* 模态框动画 */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    border-bottom: none;
    padding-bottom: 0;
}

.modal-body {
    padding-top: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.address-selects {
    display: flex;
    gap: 10px;
}

.address-selects select {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.362%22%20height%3D%22292.362%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287.9%20139.4L156.6%20.1c-4.2-3.7-10.6-3.7-14.8%200l-131.3%20139.3c-4.4%204.7-4.4%2012.4%200%2017.1l131.3%20139.3c4.2%203.7%2010.6%203.7%2014.8%200l131.3-139.3c4.4-4.7%204.4-12.4%200-17.1z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
}

.address-selects select:disabled {
    background-color: #f8f8f8;
    cursor: not-allowed;
}

.form-group input[type="text"],
.form-group textarea {
    width: calc(100% - 24px); /* Adjust for padding and border */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff5000;
    box-shadow: 0 0 5px rgba(255, 80, 0, 0.3);
}

.required {
    color: red;
    margin-right: 5px;
}

.delivery-location {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
}

.delivery-location .location {
    font-weight: bold;
    margin: 0 10px;
}

.delivery-location .change-location {
    color: #007bff;
    text-decoration: none;
}

.phone-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-group label {
     margin-bottom: 0;
}

.phone-group select {
    width: auto;
    padding-right: 30px; /* Space for arrow */
}

.phone-group input[type="text"] {
    flex-grow: 1;
    width: auto;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

.save-address-btn {
    background-color: #ff5000;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 40px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.save-address-btn:hover {
    background-color: #e54500;
} 